import React, { memo } from 'react'
import { dicoverMenu } from '@/commom/local-data.js'
import DiscoverWrap from './style.js'
import { NavLink } from 'react-router-dom'
import { renderRoutes } from 'react-router-config'
export default memo(function Discover(props) {
    const { route } = props
    return (
        <DiscoverWrap>
            <div style={{background:'#c20c0c'}}>
                <div className="menu wrap-v1">
                    <ul>
                        {dicoverMenu.map((item,index)=>{
                            return (
                                <li  key={item.title}>
                                    <NavLink exact to={item.link}>
                                        <span>
                                            {item.title}
                                        </span>
                                    </NavLink>
                                </li>
                            )
                        })}
                    </ul>
                </div>
            </div>
            {renderRoutes(route.routes)}
        </DiscoverWrap>
    )
})
